package com.business.api;

import com.business.config.FeignConfig;
import com.business.fallback.UserApiFallbackImpl;
import com.comm.entity.po.LoginUserInfo;
import com.comm.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Description: TODO
 * @Author: mis_wu
 * @Date: 2022/7/20
 * contextId 避免出现 The bean 'cloud-server-mis-wu.FeignClientSpecification' 错误
 * 与 spring.main.allow-bean-definition-overriding=true 配置作用相同
 **/
@FeignClient(value = "cloud-business-server-mis-wu",contextId = "businessUserBack",fallbackFactory = UserApiFallbackImpl.class,configuration = FeignConfig.class)
@RequestMapping("/business")
public interface UserApi {

    @PostMapping("/toLogin1")
    ResponseResult<LoginUserInfo> userLoginVerify(@RequestBody LoginUserInfo loginUserInfo);

}
